package com.sx.service.Impl;

import com.sx.bean.Student;
import com.sx.dao.Impl.StudentDaoImpl;
import com.sx.dao.StudentDao;
import com.sx.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {

    private StudentDao dao = new StudentDaoImpl();

    @Override
    public List<Student> getStudents(String stuname, String stuno, int sex,int pageIndex,int pageSize) {
        return dao.getStudents(stuname,stuno,sex,pageIndex,pageSize);
    }

    @Override
    public int total(String stuname, String stuno, int sex) {
        return dao.total(stuname,stuno,sex);
    }

    @Override
    public int insertStu(Student student) {
        return dao.insertStu(student);
    }

    @Override
    public Student findById(int sid) {
        return dao.findById(sid);
    }

    @Override
    public int updateStu(Student student) {
        return dao.updateStu(student);
    }

    @Override
    public int delStu(String sid) {
        return dao.delStu(sid);
    }

    @Override
    public int findByStuNo(String stuno) {
        return dao.findByStuNo(stuno);
    }
}
